import request from '../utils/request';
//  获取合作用户列表
export const fetchCooperationUser = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/query_update_cooperation_user_list',
        method: 'post',
        data
    });
};
// 新增和修改合作用户
export const editAndAddUser = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/insert_update_cooperation_user',
        method: 'post',
        data
    });
};
// 删除合作用户
export const delete_cooperation_user = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/delete_cooperation_user',
        method: 'post',
        data
    });
};

// 场所列表
export const query_field_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/query_field_list',
        method: 'post',
        data
    });
};
// 新增和修改场所
export const insert_update_field = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/insert_update_field',
        method: 'post',
        data
    });
};
// 删除场所
export const delete_field = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/delete_field',
        method: 'post',
        data
    });
};

// 机柜列表
export const query_equipment_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/query_equipment_list',
        method: 'post',
        data
    });
};
// 初始化机柜参数

export const initialization_equipment = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/initialization_equipment',
        method: 'post',
        data
    });
};



// 新增/修改机柜设备

export const add_update_equipment_info = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/add_update_equipment_info',
        method: 'post',
        data
    });
};

// 删除设备

export const delete_equipment = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/delete_equipment',
        method: 'post',
        data
    });
};


export const monitor_equipment_list = () => {
    return request({
        url: '/share_glasses_manager_api/equipment/monitor_equipment_list',
        method: 'get'
    });
};
// 获取设备组的参数

export const query_equipment_params = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/query_equipment_params',
        method: 'post',
        data
    });
};

// 修改机柜设备参数

export const update_equipment_params = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/update_equipment_params',
        method: 'post',
        data
    });
};

// 开锁


export const do_open_door = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/do_open_door',
        method: 'post',
        data
    });
};


export const query_equipment_running_info = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/query_equipment_running_info',
        method: 'post',
        data
    });
};



// 查询眼镜列表
export const query_glasses_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/query_glasses_list',
        method: 'post',
        data
    });
};

// 新增眼镜
export const insert_glasses = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/insert_glasses',
        method: 'post',
        data
    });
};

// 删除眼镜


export const delete_glasses = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/delete_glasses',
        method: 'post',
        data
    });
};

//  眼镜分类列表


export const query_glasses_type_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/query_glasses_type_list',
        method: 'post',
        data
    });
};

//  编辑新增眼镜分类
export const insert_update_glasses_type = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/insert_update_glasses_type',
        method: 'post',
        data
    });
};

// 查询眼镜订单


export const query_order_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/query_order_list',
        method: 'post',
        data
    });
};
//  订单详情
export const query_order_info = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/query_order_info',
        method: 'post',
        data
    });
};


//  取消订单
export const cancel_order = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/cancel_order',
        method: 'post',
        data
    });
};


//  眼镜借还记录
export const return_order_glasses = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/return_order_glasses',
        method: 'post',
        data
    });
};

//  眼镜借还记录详情
export const return_order_glasses_info = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/return_order_glasses_info',
        method: 'post',
        data
    });
};
// 手动退款

export const hand_refund = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/hand_refund',
        method: 'post',
        data
    });
};
// 押金待审核订单
export const query_deposit_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/query_deposit_list',
        method: 'post',
        data
    });
};
// 押金提现申请
export const payment_wait_refund = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/payment_wait_refund',
        method: 'post',
        data
    });
};

// 租户列表

export const query_z_user_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/query_z_user_list',
        method: 'post',
        data
    });
};

// 支付记录



export const pay_history_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/order_pay/pay_history_list',
        method: 'post',
        data
    });
};

//  用户列表
export const query_user_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/query_user_list',
        method: 'post',
        data
    });
};

//  新增用户
export const register_user = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/register_user',
        method: 'post',
        data
    });
};
// 重置密码

export const update_user_password = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/update_user_password',
        method: 'post',
        data
    });
};

// 开启用户状态

export const stop_user = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/stop_user',
        method: 'post',
        data
    });
};

//  角色列表
export const query_role_list = (params) => {
    return request({
        url: '/share_glasses_manager_api/user/query_role_list',
        method: 'get',
        params
    });
};


// 获取路由列表
export const query_module_list = () => {
    return request({
        url: '/share_glasses_manager_api/user/query_module_list',
        method: 'get',
    });
};
//  获取角色下的路由列表

export const query_role_module = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/query_role_module',
        method: 'post',
        data
    });
};
//  设置权限

export const update_role_module_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/update_role_module_list',
        method: 'post',
        data
    });
};

// 指南

export const query_guide_list = () => {
    return request({
        url: '/share_glasses_manager_api/user/query_guide_list',
        method: 'get',
    });
};
// 新增指南


export const update_guide_content = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/update_guide_content',
        method: 'post',
        data
    });
};
// 删除栏目

export const delete_guide = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/delete_guide',
        method: 'post',
        data
    });
};
// 啥选框

export const query_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/public_fun/query_list',
        method: 'post',
        data
    });
};


// 登录相关
// 获取公钥


export const public_key = () => {
    return request({
        url: '/share_glasses_manager_api/user/public_key',
        method: 'get',
    });
};

// 登录


export const loginApi = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/login',
        method: 'post',
        data
    });
};

// 修改密码

export const update_oneself_user_password = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/update_oneself_user_password',
        method: 'post',
        data
    });
};

// 投诉建议


export const query_complaint_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/query_complaint_list',
        method: 'post',
        data
    });
};

//处理投诉

export const to_examine_complaint = (data) => {
    return request({
        url: '/share_glasses_manager_api/user/to_examine_complaint',
        method: 'post',
        data
    });
};
// 打开机柜门


export const do_equipment_open_door = (data) => {
    return request({
        url: '/share_glasses_manager_api/equipment/do_equipment_open_door',
        method: 'post',
        data
    });
};
//  获取读卡器列表


export const query_rfid_list = () => {
    return request({
        url: '/share_glasses_manager_api/glasses/query_rfid_list',
        method: 'get',
    });
};

// 开始读卡



export const start_rfid = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/start_rfid',
        method: 'post',
        data
    });
};


// 停止读卡
export const stop_rfid = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/stop_rfid',
        method: 'post',
        data
    });
};

// 读取数据
export const get_rfid_glasses = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/get_rfid_glasses',
        method: 'post',
        data
    });
};
// 执行入库

export const input_glasses_data = (data) => {
    return request({
        url: '/share_glasses_manager_api/glasses/input_glasses_data',
        method: 'post',
        data
    });
};
// 押金分析汇总
export const query_total_money_analysis_data = (data) => {
    return request({
        url: '/share_glasses_manager_api/analysis/query_total_money_analysis_data',
        method: 'post',
        data
    });
};
// 押金分析列表
export const query_money_analysis_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/analysis/query_money_analysis_list',
        method: 'post',
        data
    });
};
// 综合数据分析汇总
export const query_total_analysis_data = (data) => {
    return request({
        url: '/share_glasses_manager_api/analysis/query_total_analysis_data',
        method: 'post',
        data
    });
};
// 综合数据分析列表
export const query_e_analysis_data = (data) => {
    return request({
        url: '/share_glasses_manager_api/analysis/query_e_analysis_data',
        method: 'post',
        data
    });
};




// 配置权限合作管理员和财务
export const update_role_module = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/update_role_module',
        method: 'post',
        data
    });
};

// 获取所有模块列表
export const query_cooperation_module = () => {
    return request({
        url: '/share_glasses_manager_api/cooperation/query_cooperation_module',
        method: 'get'
    });
};
// 获取角色模块权限
export const query_role_module_cooperation = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/query_role_module',
        method: 'post',
        data
    });
};

//  获取角色列表
export const cooperation_role_list = () => {
    return request({
        url: '/share_glasses_manager_api/cooperation/cooperation_role_list',
        method: 'get'
    });
};

// 获取所有场地
export const query_field_list_cooperation = () => {
    return request({
        url: '/share_glasses_manager_api/cooperation/query_field_list',
        method: 'get'
    });
};
// 获取合作管理员的场地
export const query_cooperation_field_list = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/query_cooperation_field_list',
        method: 'post',
        data
    });
};
export const update_cooperation_field = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/update_cooperation_field',
        method: 'post',
        data
    });
};


export const update_user_password_cooperation = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/update_user_password',
        method: 'post',
        data
    });
};


// 市场结算
export const query_all_cooperaton_user_data = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/query_all_cooperaton_user_data',
        method: 'post',
        data
    });
};
// 切换用户状态

export const cooperation_user_swtich = (data) => {
    return request({
        url: '/share_glasses_manager_api/cooperation/cooperation_user_swtich',
        method: 'post',
        data
    });
};

